package com.lzy.system.organization.dto;

import com.lzy.validator.StringMinMaxConstraint;
import com.lzy.validator.TypeConstraint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 导航菜单
 * </p>
 *
 * @author lcc
 * @since 2023-12-05
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "SysNav对象", description = "导航菜单")
public class SysNavAddDTO {

    @ApiModelProperty("导航名称")
    @StringMinMaxConstraint(min = 1,max = 50,message = "导航名字长度只能是1-50个字符之间")
    private String nav_name;

    @ApiModelProperty("导航链接")
    @StringMinMaxConstraint(min = 0,max = 500,message = "导航链接长度只能是1-500个字符之间")
    private String nav_url;

    @ApiModelProperty("父导航id")
    @NotNull(message = "父导航id不能为空")
    private Integer pid;

    @ApiModelProperty("导航图标")
    private String nav_icon;

    @ApiModelProperty("导航目标1：嵌入，2：打开新浏览器，3：弹出窗")
    @TypeConstraint(values = {1,2,3},message = "导航目标选择范围必须是：1.嵌入，2.打开新浏览器，3.弹出窗")
    private Integer nav_target;
}
